package com.example.mapper;

import com.example.pojo.Maintenancestaff;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface MaintenancestaffMapper {
    @Select("select * from maintenancestaff")
    List<Maintenancestaff> getserviceman();

    @Select("select * from maintenancestaff where staff_zt=0")
    List<Maintenancestaff> getServicemanLeisur();

    @Update("update maintenancestaff set staff_zt=1 where staff_id=#{pdId}")
    void setType(Integer pdId);

    @Update("update maintenancestaff set staff_zt=0 where staff_id=#{staffId}")
    void pdType(Integer staffId);

    @Select("select * from maintenancestaff where staff_id=#{pdId}")
    Maintenancestaff getM(Integer pdId);
}
